var shopTop = {};
shopTop.init = function () {
    //右侧导航初始化
    shopTop.methods.RightNavInit(this);
};
shopTop.data = {};
shopTop.addEvent = function (obj) {

};
shopTop.methods = {};
//加载事件
$(function () {
    shopTop.init();
    // 用户名悬浮效果
    $(".shop-floating").hover(function () {
        $(this).find(".shop-icon-arrow").addClass("shop-icon-arrow2")
    }, function () {
        $(this).find(".shop-icon-arrow").removeClass("shop-icon-arrow2")
    })
});

//右侧导航
shopTop.methods.RightNavInit = function (obj) {
    $(window).off("scroll").on("scroll", function () {
        var wheight = $(window).height();
        var stop = $(window).scrollTop();
        if (wheight < stop) {
            //显示右导航
            $(".shop-right-nav").addClass("shop-show");
        } else {
            //隐藏右导航
            $(".shop-right-nav").removeClass("shop-show");
        }
    });
    $(".shop-right-nav .shop-btn-back-top").off("click").on("click", function () {
        $("body,html").animate({ scrollTop: 0 });
    });
}

